<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>绝对定位</title>

    <style>
      .outer {
        width: 500px;
        background-color: skyblue;
        border: 1px solid black;
        padding: 20px;
        position: relative;
      }

      .box {
        width: 100px;
        height: 100px;
      }

      .box1 {
        background-color: #999;
      }

      .box2 {
        background-color: orange;
        /* 脱离文档流 */
        position: absolute;
        top: 20px;
        left: 100px;
      }

      .box3 {
        background-color: green;
      }
    </style>
  </head>
  <body>
    <div class="outer">
      <div class="box box1">1</div>
      <div class="box box2">2</div>
      <div class="box box3">3</div>
    </div>
  </body>
</html>

<script>
  const obj = {
    name: "zhangsan",
    age: 19,
  };

  const arr = [1, 2, 3, 4];

  for (const iterator of arr) {
    console.log(iterator);
  }
</script>
